package com.jz.enu;

public enum CurrencyCodeEnum {

    QIYONG(1,"人民币"),JINYONG(0,"美元");

    private Integer currencyCode;
    private String currencyCodeName;

    CurrencyCodeEnum(Integer currencyCode, String currencyCodeName){
        this.currencyCodeName = currencyCodeName;
        this.currencyCode = currencyCode;
    }

    public static String getName(Integer state){
        for (CurrencyCodeEnum per: CurrencyCodeEnum.values()) {
            if(per.currencyCode ==state){
                return per.currencyCodeName;
            }
        }
        return null;
    }
    public Integer getCurrencyCode(){
        return currencyCode;
    }
    public String getCurrencyCodeName(){
        return currencyCodeName;
    }

}
